Skip to content

feat(github): add pull request level actions - #699

Merged
sudomaggie merged 1 commit into
developfrom
dev/github-pr-level-actions
Aug 6, 2026
Merged

feat(github): add pull request level actions#699
sudomaggie merged 1 commit into
developfrom
dev/github-pr-level-actions

Conversation

@Harry19081

@Harry19081 Harry19081 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Problem

ORGII's shared GitHub pull-request pages expose conversation reviews but do not provide the pull-request lifecycle controls available in GitHub. Users must leave ORGII to merge, enable merge automation, manage requested reviewers, or close and reopen a pull request. The different PR hosts also need one authoritative implementation so their status and controls cannot drift.

Solution

Add one borderless, background-free PR-level action row to the shared PrDetailPanel, which covers Source Control, My Station, tabs, and chat-hosted PR views. The row supports repository-allowed merge methods, expected-head guards, auto-merge, merge-queue enqueue/dequeue behavior, direct reviewer requests/removals, and close/reopen. Existing whole-PR Approve, Request changes, and Comment controls remain in Conversation.

Add typed Tauri commands and REST/GraphQL payloads for those mutations. Every action flows through one scoped mutation dispatcher and reconciles the authoritative PR bundle afterward. Merge metadata and merge-queue state are loaded concurrently with the existing compare request, and the lifted tab header derives status from the refreshed detail.

The API shapes follow GitHub's documented pull-request merge endpoint, review-request endpoints, and current GraphQL input schema.

Potential risks

GitHub repository policies, branch protection, token permissions, and transient mergeability can still reject an action after the UI presents it; server errors are surfaced and the panel reconciles after both success and failure. PR detail now makes one best-effort GraphQL metadata request in parallel with its existing compare request, which adds API/rate-limit cost; a metadata failure degrades to the existing REST state rather than failing the detail page. Reviewer management currently supports direct users returned by the repository's assignable-user source, not team review requests.

No live destructive GitHub mutation or desktop screenshot was performed. The PR remains Draft pending a signed-in visual/action pass. Rollback is reverting commit 22759aa87; there is no schema, persistence, configuration, dependency, or public wire-format migration.

Verification

  • npx vitest run src/api/tauri/github/pullRequests.test.ts src/shared/pr/prLevelActions.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrConversationTab.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrDetailPanel.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/useWorkstationPrDetail.test.ts — 5 files, 22 tests passed.
  • npx tsc --noEmit --pretty false — passed.
  • npx eslint src/api/tauri/github/pullRequests.ts src/api/tauri/github/pullRequests.test.ts src/shared/pr/prLevelActions.ts src/shared/pr/prLevelActions.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrLevelActions.tsx src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrDetailPanel.tsx src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrDetailPanel.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrConversationTab.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/useWorkstationPrDetail.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/useWorkstationPrDetail.test.ts src/modules/WorkStation/TabContent/renderers/githubPrDetail.tsx src/store/workstation/codeEditor/workstationSelectedPrAtom.ts — passed.
  • cargo clippy -p integrations --all-targets -- -D warnings — passed.
  • cargo test -p integrations pr_action_payload_tests --lib — 6 tests passed.
  • rustfmt --edition 2021 --check crates/integrations/src/github/client.rs crates/integrations/src/github/commands/pulls.rs — passed.
  • git diff --cached --check and the repository pre-commit hook — passed; the hook reran lint-staged, TypeScript, scoped Rust clippy, and staged-file integrity checks.
  • Read-only GitHub GraphQL introspection confirmed the enable/disable-auto-merge and enqueue/dequeue input fields; the merge-metadata query was also accepted by the current schema.

Audit

  • Architecture audit covered compile/type integrity, one shared mutation owner, canonical merge-method/state vocabulary, failure defaults, REST/GraphQL payload contracts, shared-host initialization parity, and repo/head-SHA ownership.
  • Manual frontend consistency pass found the action row uses existing Button, Dropdown, Avatar, Message, and detail-panel tokens; it wraps at narrow widths and adds no enclosing background or border. The configured frontend-ui-audit skill was not present in this checkout, so no skill-format report was generated.
  • Scope audit found 16 changed files, all tied to PR-level actions and their tests. No new inline-review, file-viewed, dependency, generated artifact, secret, debug-log, personal-path, or trail-navigation change is included.

@Harry19081
Harry19081 marked this pull request as ready for review August 6, 2026 04:40
@sudomaggie
sudomaggie merged commit 16e2ca6 into develop Aug 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants